Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 28579 add way to bulk reset permissions #30352

Merged
merged 12 commits into from
Oct 17, 2024

Conversation

gortiz-dotcms
Copy link
Contributor

@gortiz-dotcms gortiz-dotcms commented Oct 15, 2024

New feature added to allow bulk reset permissions. The approach taken was to create a new actionlet, this way now the user can create a step and add a sub-action to it called "Reset Permissions". This subaction doesn't need any parameter, and to execute it the user firing the action should have edit permissions on the contentlet.

To be able to fire this action you should add it to a step as a sub-action:

How.to.add.the.subaction.mov

Then (and after adding any setting that you want) you can fire the step.

Here I show a case of an unlimited user, such as admin, in where I reset the permission of several contentlets, first I show that the contentlets have had their permissions modified.

Case admin user

admin.case.mov

Then there is the case in where the user doesn't have the permissions to edit permissions in some of the contentlets, so here I select some contentlets and show that they have only publish permissions to the Publisher role and some others that have the edit permissions, these last contentlets are going to be the ones that executes the action successfully.

Case limited user

limited.user.case.mov

Note*: Apart from the issue, an error was found and fixed. When firing some action, if the first contentlet throws a fail, the flow doesn't keep trying to execute the action in the remaining contentlets because it was throwing an exception unrelated to the action itself, here I show how was the error happening with another subaction (Unlock)

fail.error.mov

This PR fixes: #28579

@erickgonzalez erickgonzalez requested a review from jdotcms October 15, 2024 17:05
@gortiz-dotcms gortiz-dotcms linked an issue Oct 16, 2024 that may be closed by this pull request
@jdotcms
Copy link
Contributor

jdotcms commented Oct 16, 2024

about to review this

@jdotcms jdotcms added this pull request to the merge queue Oct 17, 2024
Merged via the queue into main with commit e42386d Oct 17, 2024
35 checks passed
@jdotcms jdotcms deleted the issue-28579-add-way-to-bulk-reset-permissions branch October 17, 2024 21:42
spbolton pushed a commit that referenced this pull request Nov 11, 2024
New feature added to allow bulk reset permissions. The approach taken
was to create a new actionlet, this way now the user can create a step
and add a sub-action to it called "Reset Permissions". This subaction
doesn't need any parameter, and to execute it the user firing the action
should have edit permissions on the contentlet.

To be able to fire this action you should add it to a step as a
sub-action:



https://github.com/user-attachments/assets/1955851c-2f93-4c00-b007-d7c7bf389901


Then (and after adding any setting that you want) you can fire the step.

Here I show a case of an unlimited user, such as admin, in where I reset
the permission of several contentlets, first I show that the contentlets
have had their permissions modified.

**Case admin user**


https://github.com/user-attachments/assets/d915a00d-89e9-47cd-95a6-9c0c2971e5d3


Then there is the case in where the user doesn't have the permissions to
edit permissions in some of the contentlets, so here I select some
contentlets and show that they have only publish permissions to the
Publisher role and some others that have the edit permissions, these
last contentlets are going to be the ones that executes the action
successfully.

**Case limited user**


https://github.com/user-attachments/assets/4269bec3-7d2e-41ea-8c21-8a41ebc0b2d5



**Note***: Apart from the issue, an error was found and fixed. When
firing some action, **if the first contentlet throws a fail**, the flow
doesn't keep trying to execute the action in the remaining contentlets
because it was throwing an exception unrelated to the action itself,
here I show how was the error happening with another subaction (Unlock)



https://github.com/user-attachments/assets/8cde0540-c36b-4d1f-b6cb-4aa33434a6c5

---------

Co-authored-by: erickgonzalez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to bulk Reset Permissions
3 participants